package com.sitech.portal.system.service.impl;

import java.util.HashMap;
import java.util.List;

import com.sitech.portal.system.dao.ISysUserShortcutDao;
import com.sitech.portal.system.service.ISysUserShortcutService;

public class SysUserShortcutServiceImpl implements ISysUserShortcutService {

	private ISysUserShortcutDao sysUserShortcutDao;
	
	public ISysUserShortcutDao getSysUserShortcutDao() {
		return sysUserShortcutDao;
	}

	public void setSysUserShortcutDao(ISysUserShortcutDao sysUserShortcutDao) {
		this.sysUserShortcutDao = sysUserShortcutDao;
	}

	@Override
	public void add(HashMap map) {
		// TODO Auto-generated method stub
		sysUserShortcutDao.add(map);
	}

	@Override
	public List findShortcutListByLoginID(String LOGIN_ID) {
		// TODO Auto-generated method stub
		return sysUserShortcutDao.findShortcutListByLoginID(LOGIN_ID);
	}

	@Override
	public void update(HashMap map) {
		// TODO Auto-generated method stub
		sysUserShortcutDao.update(map);
	}

	@Override
	public void insertShortcut(String loginId, String shortcutName,
			String shortcutPath, String moduleId) {
		HashMap<String,String> shortcutObj = new HashMap<String,String>();
		shortcutObj.put("LOGIN_ID", loginId);
		shortcutObj.put("SHORTCUT_NAME", shortcutName);
		shortcutObj.put("SHORTCUT_PATH", shortcutPath);
		shortcutObj.put("MODULE_ID", moduleId);
		sysUserShortcutDao.insertShortcut(shortcutObj);
	}

	@Override
	public void deleteForTB_SYS_USER_SHORTCUT(String loginId, String moduleId) {
		HashMap<String,String> shortcutObj = new HashMap<String,String>();
		shortcutObj.put("LOGIN_ID", loginId);
		shortcutObj.put("MODULE_ID", moduleId);
		sysUserShortcutDao.deleteForTB_SYS_USER_SHORTCUT(shortcutObj);
	}
	

}
